<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        html, body {
            height: 100%;
        }
    </style>
</head>
<body>
    <script>
        document.body.addEventListener('click', () => {
            console.log(this);
        })
        var nickname = "LiLei"
        function Person(name) {
            this.nickname = name
            this.sayHi = function() {
                console.log(this.nickname);
                setTimeout(function() {
                    console.log(this.nickname);
                }, 0)
            }
        }
        var Male = {
            nickname: "XiaoFang",
            sayHi: () => {
                console.log(this.nickname)
            }
        }
        var person = new (Person.bind(Male, "XiaoHong"))()
        person.sayHi()
    </script>
</body>
</html>